Sorting an Array in Bash

You don’t really need all that much code: [cc lang=”bash”]IFS=$’\n’ sorted=($(sort